/*
 * @Author: your name
 * @Date: 2021-03-24 22:21:35
 * @LastEditTime: 2021-04-27 23:12:04
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \jianfa-api\service\stateService.js
 */
const stateDao = require("../dao/stateDao");
module.exports = {
    //添加动态列表
    async addListService(params) {
        return await stateDao.addListDao(params);
    },
    // 获取父亲菜单
    async getTowListService(params) {
        const res = await stateDao.getTowListDao(params);
        res.results.sort((a, b) => b.sort - a.sort);
        return res;
    },
    //添加url链接
    async addWebUrlService(params) {
        return await stateDao.addWebUrlDao(params);
    },
    //获取列表
    async getListService(params) {
        const res = await stateDao.getListDao(params);
        res.results.sort((a, b) => b.sort - a.sort);
        return res;
    },
    //更具id获取url链接
    async getUrlService(params) {
        return await stateDao.getUrlDao(params);
    },
    //更具id删除列表
    async delListService(params) {
        return await stateDao.delListDao(params);
    },
    //更具id删除url
    async delUrlService(params) {
        return await stateDao.delUrlDao(params);
    },
    // 增加二级父菜单
    async addTowListService(params) {
        return await stateDao.addTowListDao(params);
    },
    // 删除二级父菜单
    async delTowListService(params) {
        return await stateDao.delTowListDao(params);
    },
};
